import Vue from 'vue'
import App from './App'
import store from './common/store'   //全局引入
// import request from './common/request'
import Request from 'luch-request'

Vue.prototype.$store = store  //实例化
// Vue.prototype.$request = request
Vue.config.productionTip = false

const http = new Request({
  // baseURL: "http://81.68.146.156:8080/",
  // baseURL: "http://172.22.40.203:8080/",
  // baseURL: "http://172.22.126.123:8080/",
  // baseURL: "http://172.22.171.192:8080/",
  baseURL: "http://172.22.62.79:8080/",
  header: { "content-type": "application/x-www-form-urlencoded" },
});
Vue.prototype.$http = http;

var api = {
  user: "/ShareYunAlbum/userServlet",
  pic: "/ShareYunAlbum/pictureServlet",
  album: "/ShareYunAlbum/albumServlet"
}
Vue.prototype.urlApi = api;

var responseCodes = {
  login: {
    loginSuccess: "100",
    userIdError: "101",
    pwError: "102",
    loginUnknownError: "103",
    sendMsgSuccess: "2010",
    sendMsgError: "2011",
    identifySuccess: "2020",
    identifyCodeError: "2021",
    identifyUnknownError: "2022"
  },
  signUp: {
    signUpSuccess: "100",
    accountExistsError: "101",
    unknownError: "102",
  },
  createAlbum: {
    success: "100",
    fail: "101"
  }
}

Vue.prototype.$responseCode = responseCodes;

App.mpType = 'app'

const app = new Vue({
  ...App
})

app.$mount()
